1. Technical Field
The present invention relates generally to an improved data processing system in particular to a method and apparatus for optimizing references to data structures. Still more particularly, the present invention relates to a method and apparatus for optimizing references to objects in a distributed object oriented environment.
2. Description of the Related Art
The development of application and system software for data processing systems has traditionally been a time consuming task. The field of software engineering has attempted to overcome the limitations of traditional techniques by proposing new, more efficient software development models. Object oriented programming has emerged as a promising technology that will allow rapid development, implementation and customization of objects. Each new object has certain data attributes and processes or methods that operate on that data. Data is said to be "encapsulated" by an object and can only be modified by the object methods invoked by sending a message to an object identifying the method and supplying any needed arguments.
Object oriented systems have two important properties in addition to encapsulation. "Inheritance" is the ability to derive a new object from an existing object and inherit all properties, including methods and data structure, from the existing object. The new object may have certain unique features which are supplied as overrides or modifications to the existing class. For example, a new subclass needs to specify only the functions and data that distinguish that class from the existing more general class.
The ability to override an existing method description enables polymorphism, the ability to have a single message to an object be processed in different ways depending on the object itself.
Inheritance and polymorphism create a powerful structure for implementing new software systems. The software developer does not have to develop each piece of a system, he or she need only specify the unique features of the system.
The power of object oriented systems is realized through the development of system "frameworks." A framework is a collection of base classes that can be used by a system implementor to create a final systems product. The framework is defined and developed to work together as a system. Conceptually, the framework is much like a set of standard hardware components used by computer hardware builders. Each of the components has certain defined functions and interfaces and the engineer assembles these components according to a particular design to create a unique hardware system.
The common object request broker architecture (CORBA) is a standard established by the object management group (OMG). This standard is based on an object oriented system in which an object system contains an allocation of objects that isolates the requestor's services (clients) from providers of services by well-defined encapsulating interface. In particular, clients are isolated from the implementation of service as data representations and executable code. More details on CORBA can be found in "The Common Object Request Broker: Architecture and Specification", Revision 2.0, July 1995, updated July 1996, which is available from OMG at OMG Headquarters, 492 Old Connecticut Path, Framingham, Mass. 01701.
Presently in CORBA, a client application accesses an object in a server data processing system through the object reference of the object. The object reference is manufactured and exported to clients by the server hosting the object. The object reference contains the information needed by the object request broker (ORB) to identify or locate the object within the server in a distributed data processing environment that is hosting the object. Client use of an object reference causes the object request broker to refer to the original object to the same server that manufactured the object reference. Additionally, OMG also has a naming service. The naming service is the principal mechanism in the CORBA environment to locate remote resources in a distributed object environment. The naming service allows clients to register human readable names with object references and have this association stored in a central repository. This service also allows clients to find or look up object references by the same human readable name. The naming context (NC) is the principal object within the name service that client programs interact with to register or look up resources.
OMG define interface for the naming service was designed to encapsulate existing naming or directory technology such as, for example, the distributed computing environment's (DCE) cell directory service (CDS). A distributed computing environment is an architecture consisting of standard programming interfaces, conventions and server functionalities (e.g. naming, distributed file system, remote procedure call) for distributing applications transparently across networks of heterogeneous computers. A cell directory service a component of DCE that provides the ability to assign a set of attributes to a name structured into a directory hierarchy. The CDS is used primarily within DCE to store remote procedure call (RPC) bindings, but its use is not limited to this.
In exploiting cell directory services, a problem of localization in object references occurs. Client use of an object reference, such as a naming context object reference, causes the object request broker to refer to the original object from the same server that manufactured the object reference, even if that server exists across a network in a distributed data processing system. This situation would occur even if the cell directory service clerk exists on the client machine or on another machine closer to the client machine capable of servicing the request. As a result, a potentially unnecessary and remote call is made across the network when it could have been serviced in a local fashion. Therefore, it would be advantageous for an improved method and apparatus for referencing objects in an object oriented environment in which objects are distributed across different machines in a distributed data processing system.